{	Problem: http://codechef.com/problems/NUMGAME/
 	Verdict: Accepted
}
var i,n,k:longint;
begin
read(n);
for i:=1 to n do begin
	read(k);
	if odd(k) then writeln('BOB') else writeln('ALICE');
end;
end. 